package com.zmn.oms.model.es;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.FIELD})
public @interface ZmnToEs {

    /**
     * 映射到es 字段名称
     * @return
     */
    String[] map() default "";

    /**
     * type 为 nested 类型时生效
     * @return
     */
    String path() default "";

    /**
     * 类型
     * @return
     */
    ZmnEsFieldType type();

    /**
     * type 为 nested 类型时生效
     * @return
     */
    ZmnEsFieldType pathType() default ZmnEsFieldType.Auto;
}
